package com.njupt.yanglonglong.report.demo.controller;

import com.njupt.yanglonglong.report.demo.common.Result;
import com.njupt.yanglonglong.report.demo.service.RUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author yangllong
 * @Date 2021/5/19 17:11
 */
@RestController
@Slf4j
@CrossOrigin
public class UserController {
    @Autowired
    private RUserService rUserService;
    @PostMapping("/getUsers")
    public Result getUsers(){
        return Result.success(rUserService.getUserList());
    }
    @PostMapping("/getStus")
    public Result getStus(){
        return Result.success(rUserService.getStuList());
    }
}
